home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Softdisk Supreme
/
Softdisk Supreme.iso
/
pc
/
DSK Files
/
0-49
/
SD008b.dsk
/
RANDOM.WALK.bas
< prev
next >
Wrap
BASIC Source File
|
2003-06-12
|
620b
|
23 lines
1 TEXT : HOME : VTAB 12: HTAB 9: PRINT "HIT CTRL-C TO HALT": FOR J = 1 TO 4000: NEXT
2 HGR :X = PEEK(49234)
3 GOSUB 20
4 X = 140:Y = 96
5 HCOLOR= A
6 X = ABS(X):Y = ABS(Y)
7 HPLOT X,Y
8 X = X -5 + RND(1) *10
9 Y = Y -5 + RND(1) *10
10 IF X >0 AND X <279 AND Y >0 AND Y <179 THEN 16
11 IF X < = 0 THEN X = X +280
12 IF X >279 THEN X = X -280
13 IF Y < = 0 THEN Y = Y +192
14 IF Y >191 THEN Y = Y -192
15 GOTO 6
16 HPLOT TO X,Y
17 N1 = N1 +1
18 IF N1 >N2 THEN GOSUB 20
19 GOTO 8
20 A = INT( RND(1) *7) +1: IF A = 4 THEN GOTO 20
21 N2 = INT( RND(1) *100) +1
22 HCOLOR= A
23 N1 = 0: RETURN